{\rtf1\ansi\ansicpg936\cocoartf1504\cocoasubrtf810
{\fonttbl\f0\fnil\fcharset134 PingFangSC-Regular;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 \'c9\'ea\'c7\'eb\'c4\'a3\'bf\'e9\
	CREATE TABLE `apply` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'c9\'ea\'c7\'ebID',\
  `begin_time` datetime DEFAULT NULL COMMENT '\'bf\'aa\'ca\'bc\'ca\'b1\'bc\'e4',\
  `company_id` char(18) DEFAULT NULL,\
  `end_time` datetime DEFAULT NULL COMMENT '\'bd\'e1\'ca\'f8\'ca\'b1\'bc\'e4',\
  `during` float(4,1) NOT NULL DEFAULT '0.0' COMMENT '\'ca\'b1\'b3\'a4',\
  `content` varchar(199) DEFAULT NULL,\
  `status` tinyint(4) DEFAULT '0' COMMENT '\'d7\'b4\'cc\'ac(100:\'b5\'c8\'b4\'fd\'c9\'f3\'c5\'fa 200:\'c9\'ea\'c7\'eb\'cd\'a8\'b9\'fd 300:\'c9\'ea\'c7\'eb\'ce\'b4\'cd\'a8\'b9\'fd 400:\'c8\'a1\'cf\'fb)',\
  `apply_type_id` char(18) NOT NULL DEFAULT '' COMMENT '\'c9\'ea\'c7\'eb\'c0\'e0\'d0\'cdID',\
  `applicant_id` char(18) NOT NULL DEFAULT '' COMMENT '\'c9\'ea\'c7\'eb\'d5\'dfID',\
  `approver_id` char(18) NOT NULL DEFAULT '' COMMENT '\'c9\'f3\'c5\'fa\'d5\'dfID',\
  `approver_time` datetime DEFAULT NULL COMMENT '\'c9\'f3\'c5\'fa\'ca\'b1\'bc\'e4',\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  `attributes` mediumtext,\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8\
\
\'bf\'bc\'c7\'da\'c4\'a3\'bf\'e9\
	CREATE TABLE `attendance` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'bf\'bc\'c7\'daID',\
  `staff_id` char(18) NOT NULL DEFAULT '' COMMENT '\'d4\'b1\'b9\'a4ID',\
  `signin_time` datetime DEFAULT NULL COMMENT '\'c7\'a9\'c8\'eb\'ca\'b1\'bc\'e4',\
  `signin_location` varchar(255) DEFAULT '' COMMENT '\'c7\'a9\'c8\'eb\'ca\'b1\'ce\'bb\'d6\'c3',\
  `signout_time` datetime DEFAULT NULL COMMENT '\'c7\'a9\'b3\'f6\'ca\'b1\'bc\'e4',\
  `company_id` char(18) DEFAULT NULL COMMENT '\'b9\'ab\'cb\'beID',\
  `signout_location` varchar(255) DEFAULT '' COMMENT '\'c7\'a9\'b3\'f6\'ca\'b1\'ce\'bb\'d6\'c3',\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'bf\'bc\'c7\'da\'d0\'c5\'cf\'a2\'b1\'ed'\
\'bf\'bc\'c7\'da\'c9\'e8\'d6\'c3\'c4\'a3\'bf\'e9\
CREATE TABLE `attendance_setting` (\
  `id` char(18) NOT NULL,\
  `sign_in_time` datetime DEFAULT NULL,\
  `sign_out_time` datetime DEFAULT NULL,\
  `work_day` int(11) DEFAULT NULL COMMENT '''\'b9\'a4\'d7\'f7\'c8\'d5,\'d2\'d40,1,2,3,4,5,6\'b7\'d6\'b1\'f0\'b1\'ed\'ca\'be\'d6\'dc\'c8\'d5\'a1\'a2\'d6\'dc\'d2\'bb\'d6\'c1\'d6\'dc\'c1\'f9\'a1\'a3'',',\
  `longitude` double DEFAULT NULL COMMENT '\'be\'ad\'b6\'c8',\
  `latitude` double DEFAULT NULL COMMENT '\'ce\'b3\'b6\'c8',\
  `address` varchar(255) DEFAULT NULL,\
  `company_id` char(18) DEFAULT NULL,\
  `effective_range` int(11) DEFAULT NULL COMMENT '\'b4\'f2\'bf\'a8\'d3\'d0\'d0\'a7\'b0\'eb\'be\'b6:1-300, 2-500, 3-800, 4-1000(\'c3\'d7)',\
  `create_time` datetime DEFAULT NULL,\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8\
\'b9\'ab\'cb\'be\'c4\'a3\'bf\'e9\
CREATE TABLE `company` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'b9\'ab\'cb\'beID',\
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '\'b9\'ab\'cb\'be\'c3\'fb\'b3\'c6',\
  `address` varchar(255) DEFAULT NULL,\
  `telephone` char(20) DEFAULT NULL,\
  `count` int(11) DEFAULT NULL,\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'b9\'ab\'cb\'be\'d0\'c5\'cf\'a2\'b1\'ed'\
\'bf\'cd\'bb\'a7\'c4\'a3\'bf\'e9\
CREATE TABLE `customer` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'bf\'cd\'bb\'a7ID',\
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '\'bf\'cd\'bb\'a7\'c3\'fb\'b3\'c6',\
  `address` varchar(255) DEFAULT '' COMMENT '\'b9\'ab\'cb\'be\'b5\'d8\'d6\'b7',\
  `company` varchar(100) DEFAULT '' COMMENT '\'b9\'ab\'cb\'be\'c3\'fb\'b3\'c6',\
  `department` varchar(100) DEFAULT '' COMMENT '\'b2\'bf\'c3\'c5\'c3\'fb\'b3\'c6',\
  `title` varchar(100) DEFAULT '' COMMENT '\'d6\'b0\'ce\'bb',\
  `phone` varchar(20) DEFAULT '' COMMENT '\'d7\'f9\'bb\'fa\'ba\'c5\'c2\'eb',\
  `creator_company_id` char(18) DEFAULT NULL COMMENT '\'b4\'b4\'bd\'a8\'d5\'df\'b9\'ab\'cb\'beID',\
  `landline` varchar(15) DEFAULT '' COMMENT '\'ca\'d6\'bb\'fa\'ba\'c5\'c2\'eb',\
  `creator_id` varchar(255) DEFAULT NULL COMMENT '\'b4\'b4\'bd\'a8\'d5\'dfID',\
  `email` varchar(50) DEFAULT '' COMMENT '\'d3\'ca\'cf\'e4\'b5\'d8\'d6\'b7',\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'bf\'cd\'bb\'a7\'d0\'c5\'cf\'a2\'b1\'ed'\
\'b2\'bf\'c3\'c5\'c4\'a3\'bf\'e9\
CREATE TABLE `department` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'b2\'bf\'c3\'c5ID',\
  `company_id` char(18) NOT NULL DEFAULT '' COMMENT '\'b9\'ab\'cb\'beID',\
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '\'b2\'bf\'c3\'c5\'c3\'fb\'b3\'c6',\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'b2\'bf\'c3\'c5\'d0\'c5\'cf\'a2\'b1\'ed'\
\'c8\'ce\'ce\'f1\'c4\'a3\'bf\'e9\
CREATE TABLE `mission` (\
  `id` char(18) NOT NULL DEFAULT '' COMMENT '\'c8\'ce\'ce\'f1ID',\
  `title` varchar(100) DEFAULT '' COMMENT '\'b1\'ea\'cc\'e2',\
  `address` varchar(100) DEFAULT NULL,\
  `content` varchar(1000) DEFAULT '' COMMENT '\'c4\'da\'c8\'dd',\
  `company_id` char(18) DEFAULT NULL COMMENT '\'b9\'ab\'cb\'beID',\
  `creator_id` char(18) DEFAULT NULL COMMENT '\'b4\'b4\'bd\'a8\'d5\'df',\
  `executor_id` char(18) DEFAULT NULL COMMENT '\'d6\'b4\'d0\'d0\'d5\'df',\
  `vistors` varchar(1000) DEFAULT NULL COMMENT '\'b0\'dd\'b7\'c3\'d5\'df',\
  `delay_explain` varchar(255) DEFAULT NULL,\
  `status` int(11) DEFAULT NULL COMMENT '\'c8\'ce\'ce\'f1\'d7\'b4\'cc\'ac\'a3\'ac0\'b1\'ed\'ca\'be\'d2\'d1\'b3\'b7\'cf\'fa\'a3\'ac1\'b1\'ed\'ca\'be\'ce\'b4\'cd\'ea\'b3\'c9\'a3\'ac2\'b1\'ed\'ca\'be\'d2\'d1\'cd\'ea\'b3\'c9\'a3\'ac3\'b1\'ed\'ca\'be\'d2\'d1\'d1\'d3\'c6\'da\'a3\'ac4\'b1\'ed\'ca\'be\'d1\'d3\'c6\'da\'cd\'ea\'b3\'c9\'a1\'a3'',',\
  `expect_time` datetime DEFAULT NULL COMMENT '\'d4\'a4\'c6\'da\'cd\'ea\'b3\'c9\'ca\'b1\'bc\'e4',\
  `end_time` datetime DEFAULT NULL,\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'c8\'ce\'ce\'f1\'d0\'c5\'cf\'a2\'b1\'ed'\
\'d4\'b1\'b9\'a4\'c4\'a3\'bf\'e9\
CREATE TABLE `staff` (\
  `id` char(18) NOT NULL,\
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '\'d4\'b1\'b9\'a4\'d0\'d5\'c3\'fb',\
  `phone` varchar(11) DEFAULT '' COMMENT '\'ca\'d6\'bb\'fa\'ba\'c5\'c2\'eb',\
  `password` varchar(30) DEFAULT '' COMMENT '\'b5\'c7\'c2\'bc\'c3\'dc\'c2\'eb',\
  `company_id` char(18) NOT NULL DEFAULT '' COMMENT '\'b9\'ab\'cb\'beID',\
  `department_id` char(18) NOT NULL DEFAULT '' COMMENT '\'b2\'bf\'c3\'c5ID',\
  `title` varchar(255) DEFAULT NULL COMMENT '\'d6\'b0\'ce\'bb',\
  `category` int(255) DEFAULT '2' COMMENT '''\'d3\'c3\'bb\'a7\'c0\'e0\'b1\'f0\'a3\'ac0-\'b3\'ac\'bc\'b6\'b9\'dc\'c0\'ed\'d4\'b1;1-\'b2\'bf\'c3\'c5\'b9\'dc\'c0\'ed\'d4\'b1\'a3\'bb2-\'c6\'d5\'cd\'a8\'d3\'c3\'bb\'a7'',',\
  `status` int(11) DEFAULT '1' COMMENT '''\'d3\'c3\'bb\'a7\'d7\'b4\'cc\'ac\'a3\'ac0\'b1\'ed\'ca\'be\'bd\'fb\'d3\'c3\'a3\'ac1\'b1\'ed\'ca\'be\'d5\'fd\'b3\'a3\'a3\'ac2\'b1\'ed\'ca\'be\'c0\'eb\'d6\'b0'',',\
  `token` char(255) DEFAULT '' COMMENT '\'c7\'eb\'c7\'f3\'c1\'ee\'c5\'c6',\
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '\'b4\'b4\'bd\'a8\'ca\'b1\'bc\'e4',\
  PRIMARY KEY (`id`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\'d4\'b1\'b9\'a4\'d0\'c5\'cf\'a2\'b1\'ed'}